package com.hans.cloud.helloclient.openfeign.fallback;

import feign.Feign;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Scope;

/**
 * Feign 调用失败后的回调类的依赖注入
 */
@Configuration
public class FeignConfiguration {
    @Bean
    @Scope("prototype")
    public Feign.Builder feignBuilder() {
        return Feign.builder();
    }

    @Bean
    public UserServiceAPIFallback fb(){
        return new UserServiceAPIFallback();
    }
}
